package cn.sdormitory.report.service.impl;

import cn.sdormitory.report.dao.RetentionStatisticsDao;
import cn.sdormitory.report.req.RetentionStatisticsReq;
import cn.sdormitory.report.service.RetentionStatisticsService;
import cn.sdormitory.report.vo.RetentionStatisticsVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : yy
 * @date: 2025/4/12 8:38
 * @description:
 */
@Service
public class RetentionStatisticsServiceImpl implements RetentionStatisticsService {

    @Resource
    private RetentionStatisticsDao retentionStatisticsDao;


    @Override
    public IPage<RetentionStatisticsVO> list(RetentionStatisticsReq statisticsReq) {
        IPage<RetentionStatisticsVO> page =  new Page<>(statisticsReq.getPageNum(), statisticsReq.getPageSize());
        retentionStatisticsDao.list(page, statisticsReq);
        return page;
    }

    @Override
    public List<RetentionStatisticsVO> export(RetentionStatisticsReq statisticsReq) {
        return retentionStatisticsDao.export(statisticsReq);
    }
}
